/*
 * Debug.cpp
 *
 *  Created on: 25.03.2009
 *      Author: Konan Andrej
 */

#include "Debug.h"

void Print( const QString str )
{
	QMessageBox* MB = new QMessageBox();
	MB->setText( str );
	MB->exec();
}

int Output( const int code, const QString str )
{
	QMessageBox* MB;
	if ( code == warning ){
		MB = new QMessageBox(QMessageBox::Warning, QObject::tr("Warning"), str, QMessageBox::Ok);
		MB->exec();
	} else
		if ( code == message ){
			MB = new QMessageBox(QMessageBox::Information, QObject::tr("Information"),
					     str, QMessageBox::Ok);
			MB->exec();
                } else
                        if ( code == ask ){
				MB = new QMessageBox(QMessageBox::Question, QObject::tr("Question"),
						     str, QMessageBox::Ok | QMessageBox::Cancel);
				return MB->exec();
                        }
        return 0;
}
